package com.hospital.api.factory;

import com.hospital.api.RemoteFileService;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService> {
    @Override
    public RemoteFileService create(Throwable cause) {
        return new RemoteFileService() {
            @Override
            public String sayHello() {
                return "调用失败";
            }

        };
    }
}
